<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="/static/adminlte/bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="/static/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" type="text/css" href="/static/css/ionicons.min.css" />
  <!-- Theme style -->
  <link rel="stylesheet" href="/static/adminlte/dist/css/AdminLTE.min.css">
		<title></title>
	</head>
	<body>

<section class="content">
      <div class="row">
		<div class="col-xs-12">
		          <div class="nav-tabs-custom">
		            <ul class="nav nav-tabs">
		              <li><a href="{{ route('admin.spec.index') }}">规格列表</a></li>
		              <li><a href="{{ route('admin.spec.add') }}">添加规格</a></li>
		              <li class="active"><a href="{{ route('admin.spec.edit',['id'=>$spec['id']]) }}">编辑</a></li>			              
		            </ul> 
		            <div class="tab-content">
						<form class="form-horizontal myform" action="{{ route('admin.spec.edit',['id'=>$spec['id']]) }}" method="post">
		                    <div class="form-group">
		                        <label class="col-sm-2 control-label">规格名称</label>
		                        <div class="col-sm-10">
		                            <input type="text" name="name" value="{{ $spec['name'] }}"  placeholder="" class="form-control">
		                        </div>
		                    </div>
							<div class="form-group">
								<label class="col-sm-2 control-label">所属商品类型</label>

								<div class="col-sm-10">
									<select name="type_id" class="form-control">
										@foreach($goodstype as $v)
										<option value="{{ $v['id'] }}" {{ $spec['type_id']===$v['id'] ? 'selected="selected"' : ''}}>{{ $v['name'] }}</option>
										@endforeach
									</select>
								</div>
							</div>		                    
		                    
		                    <div class="form-group">
		                        <label class="col-sm-2 control-label">规格项</label>
		                        <div class="col-sm-10">
		                            <textarea name="items" rows="3" cols="" class="form-control">{{ $items }}</textarea>
		                        </div>
		                    </div>		
		                    		                    
		                    <div class="form-group">
		                        <label class="col-sm-2 control-label">排序</label>
		                        <div class="col-sm-10">
		                            <input type="text" name="sort" value="{{ $spec['sort'] }}"  placeholder="" class="form-control">
		                        </div>
		                    </div>			                    
		                    	                    		                    
		                    <div class="form-group">
			                	<div class="col-sm-offset-2 col-sm-10">
			                		<input type="hidden" name="_token" value="{{csrf_token()}}">
				                	<button type="submit" class="btn btn-primary">保存</button>
			                	</div>
		                    </div>
		                </form>				              
		            </div><!-- /.tab-content -->
		          </div><!-- /.nav-tabs-custom -->
		</div><!--/.row-->
      </div>
  </section>
<!-- jQuery 2.2.3 -->
<script src="/static/adminlte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="/static/layer/layer.js" type="text/javascript" charset="utf-8"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/adminlte/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/js/admin.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
